As one of schemes for an apparatus to identify a connected device connected to the apparatus, a scheme to use identification information of the connected device has conventionally been proposed.
By way of example, a scheme for obtaining an identification code of a home electrical appliance through UART communication by an adapter with the home electrical appliance is available.
When an apparatus identifies a connected device through communication or the like, however, processing is complicated and also time-consuming.
The present disclosure aims to solve the problem above and an object thereof is to provide an operation system, a game system, and a game controller capable of identifying a connected device with a simplified scheme.
An operation system according to one aspect includes a game controller and a connected device connected to the game controller. The connected device includes a first battery for supplying electric power to the game controller, a first terminal electrically connected to the game controller, and a resistor connected to the first terminal. The game controller includes a controlled component, a second battery for supplying electric power to the controlled component, a second terminal electrically connected to the connected device, a voltage detecting circuit detecting a voltage value in accordance with a current which flows through the resistor when the first terminal and the second terminal are connected to each other, and a control circuit. The control circuit discriminates a device connected to the game controller based on the voltage value detected by the voltage detecting circuit, and switches from the second battery to the first battery for supply of electric power to the controlled component when the discriminated device is the connected device while electric power is supplied from the second battery to the controlled component.
Since a device connected to the game controller can be discriminated based on a voltage value detected by the voltage detecting circuit, a connected device can be identified with a simplified scheme.
In the exemplary embodiment, the connected device may include a light emitter emitting light in accordance with a result of discrimination by the control circuit.
By providing the light emitter, connection of the connected device can readily be checked.
In the exemplary embodiment, the game controller may include a light emission control circuit controlling the light emitter to emit light when the device discriminated by the control circuit is the connected device.
Since light emission by the light emitter can be controlled by the light emission control circuit, a notification about connection of the connected device can readily be given.
In the exemplary embodiment, the second battery is configured to be charged through supply of electric power from the first battery as switching from the second battery to the first battery is made by the control circuit.
In the exemplary embodiment, the light emission control circuit may determine whether or not a state of charge of the second battery is equal to or higher than a prescribed level, and may have the light emitter emit light when the light emission control circuit determines that the state of charge of the second battery is not equal to or higher than the prescribed level.
Since the light emitter is controlled in accordance with a state of charge, the state of charge as a result of connection of the connected device can readily be checked.
In the exemplary embodiment, the operation system includes another connected device different from the connected device. Another connected device may further include a microcomputer, a third terminal electrically connected to the game controller, and a device communication circuit transmitting identification information of another connected device itself to the game controller from the microcomputer through the third terminal. The control circuit of the game controller may discriminate a device connected to the game controller based on any of the transmitted identification information and the voltage value detected by the voltage detecting circuit.
Since the game controller can obtain identification information from the microcomputer, discrimination as the connected device containing the microcomputer can easily be made.
A game system according to one aspect includes a game controller, a connected device connected to the game controller, and a main body apparatus. The connected device includes a first battery for supplying electric power to the game controller, a first terminal electrically connected to the game controller, and a resistor connected to the first terminal. The game controller includes a controlled component, a second battery for supplying electric power to the controlled component, a second terminal electrically connected to the connected device, a voltage detecting circuit detecting a voltage value in accordance with a current which flows through the resistor when the first terminal and the second terminal are connected to each other, and a control circuit. The control circuit discriminates a device connected to the game controller based on the voltage value detected by the voltage detecting circuit, switches from the second battery to the first battery for supply of electric power to the controlled component when the discriminated device is the connected device while electric power is supplied from the second battery to the controlled component, and transmits a result of discrimination to the main body apparatus.
A device connected to the game controller can be discriminated with a simplified scheme based on a voltage value detected by the voltage detecting circuit of the game controller. Since the result of discrimination is transmitted to the main body apparatus, the main body apparatus can recognize the connected device with a simplified scheme.
In the exemplary embodiment, the main body apparatus may include an information processing circuit performing information processing based on the result of discrimination by the control circuit.
By performing information processing based on the result of discrimination in the main body apparatus, appropriate information processing in accordance with the connected device can be performed.
In the exemplary embodiment, the information processing circuit displays, on a display, information on the device connected to the game controller and discriminated based on the result of discrimination by the control circuit.
By showing information on the device connected to the game controller, usability can be improved.
In the exemplary embodiment, the control circuit transmits the result of discrimination to the main body apparatus through wireless communication.
By transmitting the result of discrimination to the main body apparatus through wireless communication, information can be transmitted and received with a simplified scheme.
A game controller according to another aspect is configured to be connected to a connected device including a first battery configured to supply electric power and a first terminal for supplying electric power from the first battery. The game controller includes a controlled component, a second battery for supplying electric power to the controlled component, a second terminal for electrical connection to the connected device, a voltage detecting circuit detecting a voltage value in accordance with a current which flows through a resistor provided in the connected device when the first terminal and the second terminal are connected to each other, and a control circuit. The control circuit discriminates a device connected to the game controller based on the voltage value detected by the voltage detecting circuit, and switches from the second battery to the first battery for supply of electric power to the controlled component when the discriminated device is the connected device while electric power is supplied from the second battery to the controlled component.
Since a device connected to the game controller is configured to be discriminated based on a voltage value detected by the voltage detecting circuit, a connected device can be identified with a simplified scheme.
In the exemplary embodiment, the game controller may further include a light emission control circuit controlling a light emitter provided in the connected device to emit light when the device discriminated by the control circuit is the connected device.
By providing the light emitter, connection of the connected device can readily be checked.
In the exemplary embodiment, the second battery is configured to be charged through supply of electric power from the first battery as switching from the second battery to the first battery is made by the control circuit.
In the exemplary embodiment, the light emission control circuit may determine whether or not a state of charge of the second battery is equal to or higher than a prescribed level, and control the light emitter to emit light when the device discriminated by the control circuit is the connected device and the light emission control circuit determines that the state of charge of the second battery is not equal to or higher than the prescribed level.
Since the light emission control circuit controls the light emitter based on a state of charge, the state of charge can easily be determined.
In the exemplary embodiment, the control circuit transmits a result of discrimination to a main body apparatus.
Since the result of discrimination is transmitted to the main body apparatus, the main body apparatus can recognize the connected device with a simplified scheme.
In the exemplary embodiment, the control circuit may receive an instruction from the main body apparatus based on the result of discrimination. The control circuit performs prescribed processing in accordance with the instruction received from the main body apparatus.
Since prescribed processing can be performed in response to an instruction from the main body apparatus in accordance with the result of discrimination by the control circuit, usability can be improved.
In the exemplary embodiment, the game controller may further include a memory storing a table in which identification information for identifying a connected device and a voltage value are brought in correspondence with each other. The control circuit may discriminate a device connected to the game controller with reference to the table stored in the memory, based on the voltage value detected by the voltage detecting circuit.
A plurality of types of connected devices can be identified with a simplified scheme by using a table.
In the exemplary embodiment, the game controller is configured to be connected to another connected device different from the connected device. Another connected device includes a microcomputer, a third terminal electrically connected to the game controller, and a device communication circuit transmitting identification information of another connected device itself to the game controller from the microcomputer through the third terminal. The control circuit discriminates a device connected to the game controller based on any of the transmitted identification information and the voltage value detected by the voltage detecting circuit.
Since the game controller can obtain identification information from the microcomputer, discrimination as the connected device containing the microcomputer can easily be made.
The foregoing and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.